package com.jlkj.web.shopnew.service.impl;

import com.jlkj.web.shopnew.dao.ManagersMapper;
import com.jlkj.web.shopnew.pojo.Managers;
import com.jlkj.web.shopnew.service.IManagers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cc.s2m.web.utils.webUtils.service.BaseServiceImpl;

@Service
public class ManagersImpl extends BaseServiceImpl<Managers, ManagersMapper, Integer> implements IManagers {
    @Autowired
    private ManagersMapper managersMapper;

    protected ManagersMapper getDao() {
        return managersMapper;
    }

    @Override
    public int getMgIdByUid(int uid) {
        //获取商家mg_id
        Managers cond = new Managers();
        cond.setUid(uid);

        Managers bean = this.getByCondition(cond);

        return bean == null ?  -1 : bean.getId();
    }
}